#ifndef HFLOATINGMESSAGE_H
#define HFLOATINGMESSAGE_H

#include "devcommon_global.h"

#include <QDialog>
#include <QTimer>
#include <QLabel>

class DEVCOMMONSHARED_EXPORT HFloatingMessage : public QDialog
{
    Q_OBJECT
public:
    explicit HFloatingMessage(QWidget *parent = nullptr);

    void setIcon(const QIcon& icon);
    void setText(const QString& text);
    void setDuration(int msec);

protected:
    void showEvent(QShowEvent *);
signals:

public slots:
    void onTimer();
private:
    QTimer mTimer;

    QLabel *mIconLabel;
    QLabel *mTextLabel;
    QString mText;

};

#endif // HFLOATINGMESSAGE_H
